import router from '@/router'
import store from '@/store'
router.beforeEach((to, from, next) => {
  console.log(111)
  if(store.state.user.token){
    if(to.path === '/login'){
      next('/')
    }else{
      next()
    }
  }else{
    next()
  }
})

